/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __STATE_SYSTEM_H__
#define __STATE_SYSTEM_H__

#include "Ogre.h"
#include "SceneObject.h"

namespace PQGame
{
	enum StateType
	{
		START_SYSTEM,//main menu,to virtual desktop 3d

		LOGIN,
		REGIST,

		CHOOSE_AVATAR,
		CHOOSE_HOME_WORLD,

		CREATE_CHARACTER,//when no character 

		ENTER_HOME_WORLD,
		ENTER_WORLD,

		LIVE_IN_HOME_WORLD,
		
		SETUP_WORLD,
		LIVE_IN_WORLD,//In the virtual world
		LIVE_IN_WORLD_PAUSE,

		EXIT_WORLD,
		
		EXIT_APPLICATION,
		
	};

	 /** This class is used to manage the system's state 
        @remarks
            Main logic goes here!
    */
	class StateSystem
	{
	public:
		~StateSystem(void);

		static StateSystem &getSingleton();
		
		void init(PQEngine::SceneObject* sceneObject);
		void enterState(StateType type);
		void update(float deltaT);
	private:
		StateType currentState;
		StateSystem(void);
	};
}
#endif
